-
-
Notifications
You must be signed in to change notification settings - Fork 32.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[code-infra] Changes for test util to work in vitest
#43625
Conversation
Netlify deploy previewhttps://deploy-preview-43625--material-ui.netlify.app/ Bundle size report |
This reverts commit 76edd75.
vitest
vitest
@@ -0,0 +1,9 @@ | |||
// Shim for vitest describe.skipIf to be able to run mocha and vitest side-by-side | |||
// TODO: Remove after migration to vitest is complete | |||
const describeSkipIf: (condition: boolean) => Mocha.PendingSuiteFunction = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I hope it's just temporary, as the name is terrible :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, we'll turn this into describe.skipIf
once we're away from mocha. There is no way to monkey patch in mocha, they don't expose these in the setup files
I've moved the test changes to #44325 so this PR is easier to review, and to also unblock other repos and teams |
@michaldudak Feel free to review this, as mentioned on the previous comment, I've removed the changes to the tests themselves and left only the config changes necessary for other repos to run. The current tests are passing, so this PR should be safe to merge. Merging this should allow us to move further on the other repos, without relying on the codesandbox version 😆 Let me know if you think someone else should review this as well. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We're already using this in Base UI (packaged by CSB CI), and we didn't hit any issues (apart from missing export in test-utils' package.json, but this has been resolved already). So I'm pretty confident it's OK.
Related to mui/mui-x#14508
Help toward mui/mui-public#170